<?php

/** 
 * 平台商品路由文件
 * @author yff
 * @date 2018-9-20 10:54:30
 */

$router->group(['middleware' => 'managerapi'], function ($router) {

    // 获取一级分类列表
    $router->get('/category/list', 'GoodsController@listCategory');

    // 添加一级分类
    $router->post('/category/add', 'GoodsController@addCategory');

    // 分类详情
    $router->get('/category/detail', 'GoodsController@categoryDetail');

    // 编辑一级分类
    $router->put('/category/update', 'GoodsController@updateCategory');

    // 删除一级分类
    $router->delete('/category/delete', 'GoodsController@deleteCategory');



    // 获取指定分类商品列表
    $router->get('/goods/list', 'GoodsController@listGoods');

    // 添加商品
    $router->post('/goods/add', 'GoodsController@addGoods');

    // 商品详情
    $router->get('/goods/detail', 'GoodsController@goodsDetail');

    // 编辑商品
    $router->put('/goods/update', 'GoodsController@updateGoods');

    // 删除商品
    $router->delete('/goods/delete', 'GoodsController@deleteGoods');

    // 图片上传
    $router->post('/image/upload', 'GoodsController@imageUpload');
});


